import {Toast} from "antd-mobile";

interface IProps {
    type: 'info' | 'fail' | 'success',
    content: string
}
export function showToast(props: IProps) {
    const {type,content} = props
    switch (type){
        case 'info':
            Toast.info(content, 2);
            break;
        case 'fail':
            Toast.fail(content, 2);
            break;
        case 'success' :
            Toast.success(content,2)
            break;
        default:
            return
    }
}